package com.yhy.common.redis.config;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yhy.common.redis.constants.RedissonModelEnum;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "redisson")
public class RedissonConfigProperties {

    private RedissonModelEnum model = RedissonModelEnum.OFF;
    private Cluster clusters;
    private Single single;

    @Data
    public static class Cluster{
        private transient String password;
        private String[] nodes;
    }

    @Data
    public static class Single{
        private String address;
        private transient String password;
        private int database;
    }

}
